package cn.lingyangwl.agile.dynamic.config.model;

import cn.lingyangwl.agile.model.module.mq.BaseMqPayload;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONWriter;
import lombok.*;

/**
 * 消息推送队列
 * @author shenguangyang
 */
@Getter
@Setter
@Builder
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
public class RefreshConfigMQ extends BaseMqPayload {
    public static final String KEY = "";
    public static final String EXCHANGE = "dynamic_config_refresh";

    public static final String REFRESH_ALL = "*";

    private ConfigMsg configMsg;

    public String toMessage() {
        return JSON.toJSONString(this, JSONWriter.Feature.WriteEnumsUsingName);
    }
}
